import Vue from "vue";
import Router from "vue-router";
import jsBridge from "../tools/jsBridge.js";
Vue.use(Router);

const router = new Router({
  routes: [
    {
      path: "/",
      name: "index",
      component: resolve => require(["@/pages/index/index"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "首页"
      }
    },
    {
      path: "/scanResult",
      name: "scanResult",
      component: resolve => require(["@/pages/scanResult"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "临时过渡页",
        InterimPage: true
      }
    },
    {
      path: "/testPage",
      name: "testPage",
      component: resolve => require(["@/pages/testPage/testPage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "测试页面"
      }
    },
    {
      path: "/businessAnalysis",
      name: "businessAnalysis",
      component: resolve => require(["@/pages/businessAnalysis/businessAnalysis"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "经营分析"
      }
    },
    {
      path: "/businessAnalysis/storeCompare",
      name: "storeCompare",
      component: resolve => require(["@/pages/storeCompare/storeCompare"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "门店对比"
      }
    },
    {
      path: "/storeManage/editStore",
      name: "editStore",
      component: resolve => require(["@/pages/editStore/editStore"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "新增门店"
      }
    },
    {
      path: "/storeManage/editStore/editStoreSuccess",
      name: "editStoreSuccess",
      component: resolve => require(["@/pages/result/editStoreSuccess"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "新增门店成功"
      }
    },
    {
      path: "/storeManage/editStore/editStoreFail",
      name: "editStoreFail",
      component: resolve => require(["@/pages/result/editStoreFail"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "新增门店失败"
      }
    },
    {
      path: "/storeManage/getMoneyQrCode/bindingFail",
      name: "bindingFail",
      component: resolve => require(["@/pages/result/bindingFail"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "绑定失败"
      }
    },
    {
      path: "/storeManage/getMoneyQrCode/bindingSuccess",
      name: "bindingSuccess",
      component: resolve => require(["@/pages/result/bindingSuccess"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "绑定成功"
      }
    },

    {
      path: "/storeManage/getMoneyQrCode",
      name: "getMoneyQrCode",
      component: resolve => require(["@/pages/getMoneyQrCode/qrCodeList"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "收款二维码"
      }
    },
    {
      path: "/storeManage/getMoneyQrCode/qrCodeDetail",
      name: "qrCodeDetail",
      component: resolve => require(["@/pages/qrCodeDetail/qrCodeDetail"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "查看收款二维码"
      }
    },
    {
      path: "/storeManage/getMoneyQrCode/editQrCode",
      name: "editQrCode",
      component: resolve => require(["@/pages/getMoneyQrCode/editQrCode"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "新增收款二维码"
      }
    },
    {
      path: "/voice",
      name: "voice",
      component: resolve => require(["@/pages/voice/voice"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "语音播报设置"
      }
    },
    {
      path: "/voice/voiceHelp",
      name: "voiceHelp",
      component: resolve => require(["@/pages/voiceHelp/voiceHelp"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "收不到语音播报"
      }
    },
    {
      path: "/storeManage",
      name: "storeManage",
      component: resolve => require(["@/pages/storeManage/storeManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "门店管理"
      }
    },
    {
      path: "/storeManage/gatheringManage",
      name: "gatheringManage",
      component: resolve => require(["@/pages/gatheringManage/gatheringManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "收款账户管理"
      }
    },
    {
      path: "/storeManage/gatheringManage/rateProtocol",
      name: "rateProtocol",
      component: resolve => require(["@/pages/gatheringManage/rateProtocol"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "阶梯费率协议"
      }
    },
    {
      path: "/storeManage/openShroffAccount",
      name: "openShroffAccount",
      component: resolve => require(["@/pages/openShroffAccount/openShroffAccount"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "开通收款账户"
      }
    },
    {
      path: "/storeManage/gatheringManage/gatheringAccountDel",
      name: "gatheringAccountDel",
      component: resolve => require(["@/pages/gatheringAccountDel/gatheringAccountDel"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "收款账户详情"
      }
    },
    {
      path: "/storeManage/gatheringManage/gatheringAccountDel/gatheringAccountDelChange",
      name: "gatheringAccountDelChange",
      component: resolve => require(["@/pages/gatheringAccountDel/gatheringAccountDelChange"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "查看变更收款账号"
      }
    },
    {
      path: "/storeManage/storeDetails",
      name: "storeDetails",
      component: resolve => require(["@/pages/storeDetails/storeDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "门店详情"
      }
    },
    {
      path: "/SMSVerification",
      name: "SMSVerification",
      component: resolve => require(["@/pages/SMSVerification/SMSVerification"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "安全验证"
      }
    },
    {
      path: "/SMSVerification2",
      name: "SMSVerification2",
      component: resolve => require(["@/pages/SMSVerification/SMSVerification2"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "安全验证"
      }
    },
    {
      path: "/setting/about",
      name: "about",
      component: resolve => require(["@/pages/about/about"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "关于"
      }
    },
    {
      path: "/setting/about/versionDescription",
      name: "versionDescription",
      component: resolve => require(["@/pages/versionDescription/versionDescription"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "版本说明"
      }
    },
    {
      path: "/mallList",
      name: "mallList",
      component: resolve => require(["@/pages/mall/mallList"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商城首页"
      }
    },
    {
      path: "/mallList/productDetails",
      name: "productDetails",
      component: resolve => require(["@/pages/mall/productDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商品详情"
      }
    },
    {
      path: "/mallList/serviceProductDetails",
      name: "serviceProductDetails",
      component: resolve => require(["@/pages/mall/serviceProductDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商品详情"
      }
    },
    {
      path: "/serviceProductIntro",
      name: "serviceProductIntro",
      component: resolve => require(["@/pages/memberManage/introduce"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员管理介绍"
      }
    },
    {
      path: "/mallList/productDetails/serviceContract",
      name: "serviceContract",
      component: resolve => require(["@/pages/mall/serviceContract"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "金多多商家软件服务协议"
      }
    },
    {
      path: "/mallList/productDetails/receiverInfo",
      name: "receiverInfo",
      component: resolve => require(["@/pages/mall/receiverInfo"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "收货人信息"
      }
    },
    {
      path: "/mallList/productDetails/payResult",
      name: "payResult",
      component: resolve => require(["@/pages/mall/payResult"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商城支付结果"
      }
    },
    {
      path: "/mallList/orderRecord",
      name: "orderRecord",
      component: resolve => require(["@/pages/mall/orderRecord"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "订购记录"
      }
    },
    {
      path: "/mallList/orderRecord/viewLogistics",
      name: "viewLogistics",
      component: resolve => require(["@/pages/mall/viewLogistics"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "查看物流"
      }
    },
    {
      path: "/mallList/orderRecord/orderDetails/viewLogistics",
      name: "orderDetailsViewLogistics",
      component: resolve => require(["@/pages/mall/viewLogistics"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "查看物流"
      }
    },
    {
      path: "/mallList/orderRecord/returnDeposit",
      name: "returnDeposit",
      component: resolve => require(["@/pages/mall/returnDeposit"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "押金返还协议"
      }
    },
    {
      path: "/mallList/orderRecord/orderDetails/returnDeposit",
      name: "orderDetailsReturnDeposit",
      component: resolve => require(["@/pages/mall/returnDeposit"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "押金返还协议"
      }
    },
    {
      path: "/mallList/orderRecord/orderDetails",
      name: "orderRecordOrderDetails",
      component: resolve => require(["@/pages/mall/orderDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "订单详情"
      }
    },
    {
      path: "/qrCodeSound/bindingStore",
      name: "bindingStore",
      component: resolve => require(["@/pages/qrCodeSound/bindingStore"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "绑定门店"
      }
    },
    {
      path: "/qrCodeSound/bindingStore/bindingSuccess",
      name: "bindingStoreSuccess",
      component: resolve => require(["@/pages/qrCodeSound/bindingSuccess"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "绑定成功"
      }
    },
    {
      path: "/qrCodeSound/authNone",
      name: "authNone",
      component: resolve => require(["@/pages/qrCodeSound/authNone"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "没有权限"
      }
    },
    {
      path: "/qrCodeSound/mainSettings/authNone",
      name: "settingAuthNone",
      component: resolve => require(["@/pages/qrCodeSound/authNone"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "没有权限"
      }
    },
    {
      path: "/qrCodeSound/mainSettings",
      name: "mainSettings",
      component: resolve => require(["@/pages/qrCodeSound/mainSettings"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "主设置面板"
      }
    },
    {
      path: "/qrCodeSound/mainSettings/networkSetting",
      name: "networkSetting",
      component: resolve => require(["@/pages/qrCodeSound/networkSetting"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "码卡龙配网"
      }
    },
    {
      path: "/qrCodeSound/mainSettings/adUpload",
      name: "adUpload",
      component: resolve => require(["@/pages/qrCodeSound/adUpload"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "广告上传"
      }
    },
    {
      path: "/qrCodeSound/mainSettings/soundSettings",
      name: "soundSettings",
      component: resolve => require(["@/pages/qrCodeSound/soundSettings"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "收款语音设置"
      }
    },
    {
      path: "/qrCodeSound/mainSettings/paySettings",
      name: "paySettings",
      component: resolve => require(["@/pages/qrCodeSound/paySettings"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "支付打印设置"
      }
    },
    {
      path: "/qrCodeSound/mainSettings/unBindingSuccess",
      name: "unBindingSuccess",
      component: resolve => require(["@/pages/qrCodeSound/unBindingSuccess"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "解绑成功"
      }
    },
    {
      path: "/machinesManage",
      name: "machinesManage",
      component: resolve => require(["@/pages/machinesManage/machinesManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "机具管理"
      }
    },
    {
      path: "/accountStatement",
      name: "accountStatement",
      component: resolve => require(["@/pages/accountStatement"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "对账单首页"
      }
    },
    {
      path: "/accountStatement/list",
      name: "accountStatementList",
      component: resolve => require(["@/pages/accountStatement/list"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "对账单"
      }
    },
    {
      path: "/accountSplitBillStatement/list",
      name: "accountSplitBillStatementList",
      component: resolve => require(["@/pages/accountSplitBillStatement/list"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "分账对账单"
      }
    },
    {
      path: "/settlementStatus",
      name: "settlementStatus",
      component: resolve => require(["@/pages/accountStatement/settlementStatus"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "结算状态查询"
      }
    },
    {
      path: "/accountStatement/details",
      name: "accountStatementDetails",
      component: resolve => require(["@/pages/accountStatement/details"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "对账单详情"
      }
    },
    {
      path: "/accountStatement/sendSuccess",
      name: "sendSuccess",
      component: resolve => require(["@/pages/accountStatement/sendSuccess"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "发送成功"
      }
    },
    {
      path: "/registerLicense",
      name: "registerLicense",
      component: resolve => require(["@/pages/registerLicense/registerLicense"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "用户注册协议"
      }
    },
    {
      path: "/ServiceAdjustmentAgreement",
      name: "ServiceAdjustmentAgreement",
      component: resolve => require(["@/pages/registerLicense/ServiceAdjustmentAgreement"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "服务调整协议"
      }
    },
    {
      path: "/ServiceAdjustmentContent",
      name: "ServiceAdjustmentContent",
      component: resolve => require(["@/pages/registerLicense/ServiceAdjustmentContent"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "服务调整内容"
      }
    },
    {
      path: "/notifyDetails",
      name: "notifyDetails",
      component: resolve => require(["@/pages/notifyDetails/notifyDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "结算款提前到账啦！"
      }
    },
    {
      path: "/storeManage/gatheringManage/gatheringAccountDel/changeSettlementAccount",
      name: "changeSettlementAccount",
      component: resolve => require(["@/pages/changeSettlementAccount/changeSettlementAccount"], resolve),
      meta: {
        title: "变更结算账号"
      }
    },
    {
      path: "/orderDetails",
      name: "orderDetails",
      component: resolve => require(["@/pages/orderDetails/orderDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "订单详情"
      }
    },
    {
      path: "/orderDetails/refund",
      name: "refund",
      component: resolve => require(["@/pages/orderDetails/refund"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "退款"
      }
    },
    {
      path: "/orderDetails/refund/refundSuccess",
      name: "refundSuccess",
      component: resolve => require(["@/pages/orderDetails/refundSuccess"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "退款成功"
      }
    },
    {
      path: "/orderDetails/refund/refundFail",
      name: "refundFail",
      component: resolve => require(["@/pages/orderDetails/refundFail"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "退款失败"
      }
    },
    {
      path: "/myDetail",
      name: "myDetail",
      component: resolve => require(["@/pages/myDetail/myDetail"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "个人信息"
      }
    },
    {
      path: "/setting",
      name: "setting",
      component: resolve => require(["@/pages/setting/setting"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "设置"
      }
    },
    {
      path: "/setting/changePassword",
      name: "changePassword",
      component: resolve => require(["@/pages/changePassword/changePassword"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "修改密码"
      }
    },
    {
      path: "/setting/changePhone",
      name: "changePhone",
      component: resolve => require(["@/pages/changePhone/changePhone"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "修改手机号"
      }
    },
    {
      path: "/employeeManage",
      name: "employeeManage",
      component: resolve => require(["@/pages/employeeManage/employeeManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "员工管理"
      }
    },
    {
      path: "/employeeManage/addEmployee",
      name: "addEmployee",
      component: resolve => require(["@/pages/employeeManage/addEmployee"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "添加员工"
      }
    },
    {
      path: "/TransactionFlow",
      name: "TransactionFlow",
      component: resolve => require(["@/pages/TransactionFlow/TransactionFlow"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "交易流水"
      }
    },
    {
      path: "/systemMsg",
      name: "systemMsg",
      component: resolve => require(["@/pages/NotificationCenter/systemMsg"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "系统消息"
      }
    },
    {
      path: "/todoList",
      name: "todoList",
      component: resolve => require(["@/pages/NotificationCenter/todoList"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "待办事项"
      }
    },
    {
      path: "/todoList/todoDetailOpenPay",
      name: "todoDetailOpenPay",
      component: resolve => require(["@/pages/NotificationCenter/todoDetailOpenPay"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "门店开通支付"
      }
    }, {
      path: "/todoList/todoDetailOpenPay/rejectOpenPay",
      name: "rejectOpenPay",
      component: resolve => require(["@/pages/NotificationCenter/rejectOpenPay"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "驳回原因"
      }
    },
    {
      path: "/memberManage",
      name: "memberManage",
      component: resolve => require(["@/pages/memberManage/list"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员管理"
      }
    },
    {
      path: "/memberManage/memberAnalysis",
      name: "memberAnalysis",
      component: resolve => require(["@/pages/memberManage/memberAnalysis"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员分析"
      }
    },
    {
      path: "/memberStoredDataStatistics",
      name: "memberStoredDataStatistics",
      component: resolve => require(["@/pages/memberStoredDataStatistics/memberStoredDataStatistics"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员储值数据统计"
      }
    },
    {
      path: "/memberStoredIntroducePage",
      name: "introducePage",
      component: resolve => require(["@/pages/memberStoredDataStatistics/introducePage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员储值介绍页"
      }
    },
    {
      path: "/selectMiniAppType",
      name: "selectMiniAppType",
      component: resolve => require(["@/pages/miniAppManage/selectMiniAppType"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "选择大小号"
      }
    },
    {
      path: "/selectMiniAppType/selfMiniAppManage",
      name: "selfMiniAppManage",
      component: resolve => require(["@/pages/miniAppManage/selfMiniAppManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "小程序管理"
      }
    },
    // {
    //   path: "/selectMiniAppType/selfMiniAppManage/WXauththorize",
    //   name: "WXauththorize",
    //   component: resolve => require(["@/pages/miniAppManage/WXauththorize"], resolve),
    //   props: route => ({ closeOrGoback: route.query.closeOrGoback }),
    //   meta: {
    //     title: "扫码授权"
    //   }
    // },
    {
      path: "/miniAppManage",
      name: "miniAppManage",
      component: resolve => require(["@/pages/miniAppManage/miniAppManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "小程序管理"
      }
    },
    {
      path: "/selectMiniAppType/miniAppManage",
      name: "miniAppManage2",
      component: resolve => require(["@/pages/miniAppManage/miniAppManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "小程序管理"
      }
    },
    {
      path: "/fxActivityRecord",
      name: "fxActivityRecord",
      component: resolve => require(["@/pages/fxActivityRecord/fxActivityRecord"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "返现营销"
      }
    },
    {
      path: "/fxActivityRecord/list/fxSettings/preview",
      name: "preview",
      component: resolve => require(["@/pages/fxSettings/preview"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "收银台预览"
      }
    },
    {
      path: "/fxActivityRecord/list",
      name: "fxActivityRecordList",
      component: resolve => require(["@/pages/fxActivityRecord/list"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "返现营销记录列表"
      }
    },
    {
      path: "/fxActivityRecord/list/fxSettings",
      name: "fxActivityRecordListSettings",
      component: resolve => require(["@/pages/fxSettings/fxSettings"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "设置"
      }
    },
    {
      path: "/fxActivityRecord/fxActivityList",
      name: "fxActivityList",
      component: resolve => require(["@/pages/fxActivityRecord/fxActivityList"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "门店活动"
      }
    },
    {
      path: "/todoList/fxActivitySigningDetails",
      name: "fxActivitySigningDetails",
      component: resolve => require(["@/pages/NotificationCenter/fxActivitySigningDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "返现营销活动开通确认"
      }
    },
    {
      path: "/todoList/fxActivitySigningDetails/fxActivitySigning",
      name: "fxActivitySigning",
      component: resolve => require(["@/pages/fxActivitySigning/fxActivitySigning"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商户签约"
      }
    },
    {
      path: "/todoList/fxActivitySigningDetails/fxActivitySigning/mobileValidate",
      name: "mobileValidate",
      component: resolve => require(["@/pages/fxActivitySigning/mobileValidate"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商户签约"
      }
    },
    {
      path: "/todoList/fxActivitySigningDetails/fxActivitySigning/moneyValidate",
      name: "mobileValidateMoney",
      component: resolve => require(["@/pages/fxActivitySigning/moneyValidate"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "开通确认"
      }
    },
    {
      path: "/miniAppManage/miniAppManageIntro",
      name: "miniAppManageIntro",
      component: resolve => require(["@/pages/miniAppManage/miniAppManageIntro"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "小程序介绍"
      }
    },
    {
      path: "/miniAppManage/miniAppManageIntro/StoreChoice",
      name: "StoreChoice",
      component: resolve => require(["@/pages/miniAppManage/StoreChoice"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "选择使用门店"
      }
    },
    {
      path: "/payParamSettings",
      name: "payParamSettings",
      component: resolve => require(["@/pages/payParamSettings/payParamSettings"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "参数设置"
      }
    },
    {
      path: "/openMessageMarketing",
      name: "openMessageMarketing",
      component: resolve => require(["@/pages/messageMarketing/openMessageMarketing"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "提交开通资料"
      }
    },
    {
      path: "/messageMarketing",
      name: "messageMarketing",
      component: resolve => require(["@/pages/messageMarketing/messageMarketing"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "短信推广"
      }
    },
    {
      path: "/splitBill",
      name: "splitBill",
      component: resolve => require(["@/pages/splitBill/splitBill"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "分账"
      }
    },
    {
      path: "/splitBill/billedStoreConfig",
      name: "splitBill/billedStoreConfig",
      component: resolve => require(["@/pages/splitBill/billedStoreConfig"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "查看分账设置"
      }
    },
    {
      path: "/splitBill/billedStoreConfig/config",
      name: "splitBill/billedStoreConfig/config",
      component: resolve => require(["@/pages/splitBill/splitBillConfig"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "分账设置"
      }
    },
    {
      path: "/splitBill/processResult",
      name: "splitBill/processResult",
      component: resolve => require(["@/pages/splitBill/processResult"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "分账设置"
      }
    },
    {
      path: "/splitBill/billedStoreConfig/addSplitBill",
      name: "splitBill/billedStoreConfig/addSplitBill",
      component: resolve => require(["@/pages/splitBill/addSplitBill/addSplitBillParty"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "填写分账方信息"
      }
    },
    {
      path: "/messageMarketing/sendMessage",
      name: "sendMessage",
      component: resolve => require(["@/pages/messageMarketing/sendMessage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "发送短信"
      }
    },
    {
      path: "/messageMarketing/sendRecord",
      name: "sendRecord",
      component: resolve => require(["@/pages/messageMarketing/sendRecord"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "发送记录"
      }
    },
    {
      path: "/messageMarketing/signManage",
      name: "signManage",
      component: resolve => require(["@/pages/messageMarketing/signManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "签名管理"
      }
    },
    {
      path: "/regionManage",
      name: "regionList",
      component: resolve => require(["@/pages/regionManage/regionList"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "区域管理"
      }
    },
    {
      path: "/regionManage/regionEdit",
      name: "regionEdit",
      component: resolve => require(["@/pages/regionManage/regionEdit"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "编辑区域"
      }
    },
    {
      path: "/iframe",
      name: "iframe",
      component: resolve => require(["@/pages/iframe/iframe"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "iframe"
      }
    },
    {
      path: "/pettySavings",
      name: "pettySavings",
      component: resolve => require(["@/pages/pettySavings/list"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员储值"
      }
    },
    {
      path: "/pettySavings/add",
      name: "pettySavingsAdd",
      component: resolve => require(["@/pages/pettySavings/edit"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员储值活动创建"
      }
    },
    {
      path: "/pettySavings/details/edit",
      name: "pettySavingsEdit",
      component: resolve => require(["@/pages/pettySavings/edit"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员储值活动编辑"
      }
    },
    {
      path: "/pettySavings/details",
      name: "pettySavingsDetails",
      component: resolve => require(["@/pages/pettySavings/details"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "会员储值活动详情"
      }
    },
    {
      path: "/setting/accountDel",
      name: "accountDel",
      component: resolve => require(["@/pages/accountDel/accountDel"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "账号注销"
      }
    },{
      path: "/concat",
      name: "concat",
      component: resolve => require(["@/pages/concat/concat"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "销售联系方式"
      }
    },
    {
      path: "/jisuyun",
      name: "jisuyun",
      component: resolve => require(["@/pages/jisuyun/jisuyun"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "加载中"
      }
    },{
      path: "/feedback",
      name: "feedback",
      component: resolve => require(["@/pages/feedback"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "意见反馈"
      }
    },
    {
      path: "/goodsManageIndex",
      name: "goodsManageIndex",
      component: resolve => require(["@/pages/goodsManage/index"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商品管理",
        InterimPage: true
      }
    },
    {
      path: "/goodsDataBoard/goodsManage",
      name: "goodsManage",
      component: resolve => require(["@/pages/goodsManage/list"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商品管理列表"
      }
    },
    {
      path: "/goodsDataBoard/goodsManage/edit",
      name: "goodsedit",
      component: resolve => require(["@/pages/goodsManage/edit"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商品编辑"
      }
    },
    {
      path: "/goodsDataBoard/goodsManage/spread",
      name: "goodsspread",
      component: resolve => require(["@/pages/goodsManage/spread"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "推广"
      }
    },
    {
      path: "/goodsDataBoard",
      name: "goodsDataBoard",
      component: resolve => require(["@/pages/goodsDataBoard/list"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "商品数据看板"
      }
    },
    {
      path: "/goodsDataBoard/single",
      name: "goodsDataBoardSingle",
      component: resolve => require(["@/pages/goodsDataBoard/single"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "单商品数据看板"
      }
    },
    {
      path: "/cancelVerifi/cancelVerifiList",
      name: "cancelVerifiList",
      component: resolve => require(["@/pages/cancelVerifi/cancelVerifiList"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "核销记录"
      }
    },
    {
      path: "/cancelVerifi/cancelVerifiList/details",
      name: "cancelVerifiDetails",
      component: resolve => require(["@/pages/cancelVerifi/cancelVerifiDetails"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "核销详情"

      }
    },
    {
      path: "/cancelVerifi",
      name: "cancelVerifi",
      component: resolve => require(["@/pages/cancelVerifi/cancelVerifi"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "电子券核销"

      }
    },
    {
      path: "/cancelVerifi/cancelVerifiResult",
      name: "cancelVerifiResult",
      component: resolve => require(["@/pages/cancelVerifi/cancelVerifiResult"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "核销结果"
      }
    },
    {
      path: "/activity/zfbConsumerCoupon",
      name: "zfbConsumerCoupon",
      component: resolve => require(["@/pages/activity/zfbConsumerCoupon"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "支付宝城市消费券"
      }
    },
    {
      path: "/couponMarketing",
      name: "couponMarketing",
      component: resolve => require(["@/pages/couponMarketing"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "券营销"
      }
    },
    {
      path: "/couponMarketing/couponList",
      name: "couponMarketing/couponList",
      component: resolve => require(["@/pages/couponMarketing/couponList"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "券营销"
      }
    },
    {
      path: "/couponMarketing/couponEdit",
      name: "couponMarketing/couponEdit",
      component: resolve => require(["@/pages/couponMarketing/couponEdit"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "券活动创建"
      }
    },
    {
      path: "/couponMarketing/couponManage",
      name: "couponMarketing/couponManage",
      component: resolve => require(["@/pages/couponMarketing/couponManage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "券活动管理"
      }
    },
    {
      path: "/couponMarketing/couponRecord",
      name: "couponMarketing/couponRecord",
      component: resolve => require(["@/pages/couponMarketing/couponRecord"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "券核销记录"
      }
    },
    {
      path: "/maSanNetwork",
      name: "maSanNetwork",
      component: resolve => require(["@/pages/qrCodeSound/maSanNetwork"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "码先声Ⅲ配网"
      }
    }, {
      path: "/maSanInstructions",
      name: "maSanInstructions",
      component: resolve => require(["@/pages/qrCodeSound/maSanInstructions"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "码先声Ⅲ说明书"
      }
    }, {
      path: "/ethApp",
      name: "ethApp",
      component: resolve => require(["@/pages/ethApp"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "E团火收银软件"
      }
    },
    {
      path: "/home",
      name: "Home",
      component: resolve => require(["@/pages/home"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "首页"
      }
    },
    {
      path: "/finance",
      name: "FinancePage",
      component: resolve => require(["@/pages/finance"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "金融"
      }
    },
    {
      path: "/financeChild",
      name: "FinanceChildPage",
      component: resolve => require(["@/pages/finance/childPage"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "共享付"
      }
    },
    {
      path: "/my",
      name: "MyPage",
      component: resolve => require(["@/pages/my"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "我的"
      }
    },
    {
      path: "/tongfuLoan",
      name: "TongfuLoanPage",
      component: resolve => require(["@/pages/home/tongfuLoan"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "同福贷"
      }
    },
    {
      path: "/SelectStore",
      name: "SelectStore",
      component: resolve => require(["@/pages/home/SelectStore"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: "选择门店"
      }
    },
    {
      path: "/content",
      name: "ContentPage",
      component: resolve => require(["@/pages/home/content"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: ""
      }
    },
    {
      path: "/tongfuPublicity",
      name: "TongfuPublicityPage",
      component: resolve => require(["@/pages/news/tongfuPublicity"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: ""
      }
    },
    {
      path: "/tongfuPublicityFarming",
      name: "TongfuPublicityFarmingPage",
      component: resolve => require(["@/pages/news/tongfuPublicityFarming"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: ""
      }
    },
    {
      path: "/tongfuPublicityMantou",
      name: "TongfuPublicityMantouPage",
      component: resolve => require(["@/pages/news/tongfuPublicityMantou"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: ""
      }
    },
    {
      path: "/subsidyPolicy",
      name: "SubsidyPolicyPage",
      component: resolve => require(["@/pages/policy/subsidy"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: ""
      }
    },
    {
      path: "/loanPolicy",
      name: "LoanPage",
      component: resolve => require(["@/pages/policy/loan"], resolve),
      props: route => ({ closeOrGoback: route.query.closeOrGoback }),
      meta: {
        title: ""
      }
    }
  ]
});
router.beforeEach((to, from, next) => {
  // /* 路由发生变化修改页面title */
  // if (to.meta.title) {
  //   document.title = to.meta.title;
  //   jsBridge.setTitle(to.meta.title);
  // }
  jsBridge.routerBeforeEach({toName: to.name});

  next();
});

export default router;
